﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Gridviews_cajasGrid : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        cancelar.Attributes.Add("OnClick", "javascript:cancelar();");
    }
    protected void GridViewf_OnRowCommand(Object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Aceptar")
        {

            GridCajas.SelectedIndex = Convert.ToInt32(e.CommandArgument);
            Response.Write("<SCRIPT language=\"javascript\"> window.opener.retornaNumCaja(\"" + GridCajas.SelectedRow.Cells[0].Text + "\");</script>");
            Response.Write("<SCRIPT language=\"javascript\"> window.close();</script>");

        }
    }
}
